import java.util.Scanner;

public class addZore {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入金额：");
        int money = sc.nextInt();
        String result = "";

        while (true) {
            if (money == 0) {
                break;
            }
            int ge = money % 10;
            money = money / 10;
            String a = toUpperCase(ge);
            result = a + result;
        }

        System.out.println(result); // 原始转换结果
        String newResult = addZero(result); // 补零后的结果
        System.out.println(newResult);
    }

    // 数字转大写
    public static String toUpperCase(int money) {
        String[] arr = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"};
        return arr[money];
    }

    // 修正后的补零方法
    public static String addZero(String str) {
        // 如果超过7位，只保留后7位
        if (str.length() > 7) {
            str = str.substring(str.length() - 7);
        }
        // 不足7位时补零
        while (str.length() < 7) {
            str = "零" + str;
        }
        return str;
    }
}